﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>发票内容</title>
    <link rel="stylesheet" type="text/css" href="../Content/Css/OperaMasksUI/default/om-all.css" />
    <link rel="stylesheet" type="text/css" href="../Content/Css/list.css" />
    <script type="text/javascript" src="../Scripts/jquery.1.6.3.min.js"></script>
    <script type="text/javascript" src="../Scripts/json2.js"></script>
    <script type="text/javascript" src="../Scripts/common.js"></script>
    <script type="text/javascript" src="../Scripts/OperaMasksUI/operamasks-ui.min.js"></script>
    <script type="text/javascript" src="../Scripts/Plugin/jquery.form.js"></script>
    <script type="text/javascript" src="../Scripts/OperaMasksUI/Plugin/om-yj-container.js"></script>
    <script type="text/javascript" src="../Scripts/Plugin/artDialog4.1.7/jquery.artDialog.js?skin=default"></script>
    <script type="text/javascript" src="../Scripts/Plugin/artDialog4.1.7/plugins/iframeTools.js"></script>
    <script type="text/javascript" src="../Scripts/banBackSpace.js"></script>
    <script type="text/javascript">
        var detailPanel, listGrid, toolButtonBar, colData, searchPanel, defaultSort, defaultWhere, validatorForm, submitForm, currentUID, currentGIndex, modelDialog, showCDialog;
        var showSearchPanel, showDetialForm, controlBtn, oldRowData, detailForm, goOn = true, genRenderCheckbox, genRenderDateformat, comboxFeeTypeData = [], inputChange, calTotal;
        var actionRoot = "../handler/ajax.ashx?type=AjaxSystem";

        $(document).ready(function () {
            currentUID = art.dialog.data('currentUID');
            billID = art.dialog.data('BillID');
            detailForm = $('#detail');
            validatorForm = $('#detail').validate({
                errorContainer: "#errorMessages",
                errorLabelContainer: "#errorMessages",
                wrapper: "span",
                errorClass: "omError",
                rules: {
                    InvoiceFMTitle: { required: true },
                    InvoiceFMTaxNo: { required: true },
                    InvoiceFMAddr: { required: true },
                    InvoiceFMAccount: { required: true },
                    InvoiceTOTitle: { required: true },
                    InvoiceTOTaxNo: { required: true },
                    InvoiceTOAddr: { required: true },
                    InvoiceTOAccount: { required: true },
                    UserGet: { required: true },
                    UserDoc: { required: true },
                    UserVerify: { required: true }
                },
                messages: {
                    InvoiceFMTitle: { required: "[名称]不能为空" },
                    InvoiceFMTaxNo: { required: "[纳税人识别号]不能为空" },
                    InvoiceFMAddr: { required: "[地址电话]不能为空" },
                    InvoiceFMAccount: { required: "[开户行及账号]不能为空" },
                    InvoiceTOTitle: { required: "[名称]不能为空" },
                    InvoiceTOTaxNo: { required: "[纳税人识别号]不能为空" },
                    InvoiceTOAddr: { required: "[地址电话]不能为空" },
                    InvoiceTOAccount: { required: "[开户行及账号]不能为空" },
                    UserGet: { required: "[收款人]不能为空" },
                    UserDoc: { required: "[开票人]不能为空" },
                    UserVerify: { required: "[复核人]不能为空" }
                }
            });
            //获取相关信息
            $.ajax({
                cache: false, async: false,
                url: '../handler/ajax.ashx?type=AjaxSystem&method=GetBillInvoiceInfo',
                dataType: 'json', type: 'post',
                data: { UID: billID, TYPEID:0, USERID: currentUID },
                beforeSend: function () {
                    $.omMessageBox.waiting({
                        title: '请等待',
                        content: '系统正在获取发票信息,请稍后...'
                    });
                },
                complete: function () {
                    $.omMessageBox.waiting("close");
                },
                success: function (data) {
                    if (data.IsError) {
                        $.omMessageBox.alert({
                            content: '错误：' + data.Message
                        });
                    }
                    else {
                        var tempRowData = JSON2.parse(data.Data);
                        if (tempRowData.length == 1) {
                            showDetialForm(tempRowData[0], detailForm);
                        }
                    }
                },
                error: function (result) {
                    $.omMessageBox.alert({
                        content: '发现系统错误,请重新登录<BR>错误码：' + result.status
                    });
                }
            });
            $('input[id^=QTY]').change(function () {
                var tempid = $(this).attr("id");
                var i = tempid.substring(tempid.length - 1, tempid.length);
                if (!isNaN($('#QTY' + i.toString()).val()) && !isNaN($('#Price' + i.toString()).val()) && !isNaN($('#TaxRate' + i.toString()).val())) {
                    $('#Amount' + i.toString()).val(($('#QTY' + i.toString()).val() * $('#Price' + i.toString()).val()).toFixed(2));
                    $('#Tax' + i.toString()).val((($('#Amount' + i.toString()).val() / (1 + parseFloat($('#TaxRate' + i.toString()).val()))) * $('#TaxRate' + i.toString()).val()).toFixed(2));
                    calTotal('Amount');
                    calTotal('Tax');
                }
                else {
                    alert('数量必须是数字');
                }
            });
            $('input[id^=Price]').change(function () {
                var tempid = $(this).attr("id");
                var i = tempid.substring(tempid.length - 1, tempid.length);
                if (!isNaN($('#QTY' + i.toString()).val()) && !isNaN($('#Price' + i.toString()).val()) && !isNaN($('#TaxRate' + i.toString()).val())) {
                    $('#Amount' + i.toString()).val(($('#QTY' + i.toString()).val() * $('#Price' + i.toString()).val()).toFixed(2));
                    $('#Tax' + i.toString()).val((($('#Amount' + i.toString()).val() / (1 + parseFloat($('#TaxRate' + i.toString()).val()))) * $('#TaxRate' + i.toString()).val()).toFixed(2));
                    calTotal('Amount');
                    calTotal('Tax');
                }
                else {
                    alert('单价必须是数字');
                }
            });
            $('input[id^=TaxRate]').change(function () {
                var tempid = $(this).attr("id");
                var i = tempid.substring(tempid.length - 1, tempid.length);
                if (!isNaN($('#QTY' + i.toString()).val()) && !isNaN($('#Price' + i.toString()).val()) && !isNaN($('#TaxRate' + i.toString()).val())) {
                    $('#Amount' + i.toString()).val(($('#QTY' + i.toString()).val() * $('#Price' + i.toString()).val()).toFixed(2));
                    $('#Tax' + i.toString()).val((($('#Amount' + i.toString()).val() / (1 + parseFloat($('#TaxRate' + i.toString()).val()))) * $('#TaxRate' + i.toString()).val()).toFixed(2));
                    calTotal('Amount');
                    calTotal('Tax');
                }
                else {
                    alert('税率必须是数字');
                }
            });
            showToolBar(detailForm);
        });

        calTotal = function (tt) {
            var tempTotal = 0.00;
            for (var j = 1; j <= 8; j++) {
                if (!isNaN($('#' + tt + j.toString()).val()) && $('#' + tt + j.toString()).val().length > 0) {
                    tempTotal += parseFloat($('#' + tt + j.toString()).val());
                }
                else {
                    tempTotal += 0.00;
                }
            }
            $('#'+tt).val(tempTotal.toFixed(2));
        };

        showToolBar = function (form) {
            $('span#button-close', form).omButton({
                icons: { left: '../Content/Images/List/ok.gif' }, width: 80,
                onClick: function () {
                    art.dialog.close();
                }
            });
            $('span#button-clear', form).omButton({
                icons: { left: '../Content/Images/List/ok.gif' }, width: 80,
                onClick: function () {
                    var oldamount = $("#bodyform input[id=InvoiceAmount]").val();
                    $("#bodyform input").val('');
                    $("#bodyform input[id=InvoiceAmount]").val(oldamount);
                }
            });
            $('span#button-cal', form).omButton({
                icons: { left: '../Content/Images/List/ok.gif' }, width: 80,
                onClick: function () {
                    $.ajax({
                        cache: false, async: false,
                        url: '../handler/ajax.ashx?type=AjaxSystem&method=GetBillInvoiceInfo',
                        dataType: 'json', type: 'post',
                        data: { UID: billID, TYPEID: 1, USERID: currentUID },
                        beforeSend: function () {
                            $.omMessageBox.waiting({
                                title: '请等待',
                                content: '系统正在获取发票信息,请稍后...'
                            });
                        },
                        complete: function () {
                            $.omMessageBox.waiting("close");
                        },
                        success: function (data) {
                            if (data.IsError) {
                                $.omMessageBox.alert({
                                    content: '错误：' + data.Message
                                });
                            }
                            else {
                                var tempRowData = JSON2.parse(data.Data);
                                if (tempRowData.length == 1) {
                                    showDetialForm(tempRowData[0], detailForm);
                                }
                            }
                        },
                        error: function (result) {
                            $.omMessageBox.alert({
                                content: '发现系统错误,请重新登录<BR>错误码：' + result.status
                            });
                        }
                    });
                }
            });
            $('span#button-save', form).omButton({
                icons: { left: '../Content/Images/List/accept.png' }, width: 80,
                onClick: function () {
                    if (validatorForm.form()) {
                        var errorInfo = '';
                        for (var j = 1; j <= 8; j++) {
                            if ($('#Amount' + j.toString()).val().length > 0) {
                                if (!isNaN($('#Amount' + j.toString()).val()) && parseFloat($('#Amount' + j.toString()).val()) > 0) {
                                    if ($('#FeeType' + j.toString()).val().length == 0) {
                                        errorInfo = '请仔细检查明细数据,是否完整';
                                        break;
                                    }
                                }
                            }
                        }
                        if (parseFloat($('#Tax').val()) + parseFloat($('#Amount').val()) != parseFloat($('#InvoiceAmount').val())) {
                            errorInfo += '!!!请仔细检查明细数据,金额是否匹配!!!';
                        }
                        if (errorInfo.length > 0) {
                            $.omMessageBox.alert({
                                content: '发现错误<BR>：' + errorInfo,
                                onClose: function () {
                                }
                            });
                        }
                        else {
                            //执行更新
                            var sql = '';
                            sql = " UPDATE cInvoice SET  InvoiceFMTitle = '" + $("#InvoiceFMTitle").val() + "',InvoiceFMTaxNo = '" + $("#InvoiceFMTaxNo").val() + "',InvoiceFMAddr = '" + $("#InvoiceFMAddr").val() + "',InvoiceFMAccount = '" + $("#InvoiceFMAccount").val() + "',";
                            sql += "FeeType1 =  '" + $("#FeeType1").val() + "',Model1 = '" + $("#Model1").val() + "',Unit1 = '" + $("#Unit1").val() + "',QTY1 = " + valueSet($("#QTY1").val()) + ",Price1 = " + valueSet($("#Price1").val()) + ",Amount1 = " + valueSet($("#Amount1").val()) + ",TaxRate1 = " + valueSet($("#TaxRate1").val()) + ",Tax1 = " + valueSet($("#Tax1").val()) + ",";
                            sql += "FeeType2 =  '" + $("#FeeType2").val() + "',Model2 = '" + $("#Model2").val() + "',Unit2 = '" + $("#Unit2").val() + "',QTY2 = " + valueSet($("#QTY2").val()) + ",Price2 = " + valueSet($("#Price2").val()) + ",Amount2 = " + valueSet($("#Amount2").val()) + ",TaxRate2 = " + valueSet($("#TaxRate2").val()) + ",Tax2 = " + valueSet($("#Tax2").val()) + ",";
                            sql += "FeeType3 =  '" + $("#FeeType3").val() + "',Model3 = '" + $("#Model3").val() + "',Unit3 = '" + $("#Unit3").val() + "',QTY3 = " + valueSet($("#QTY3").val()) + ",Price3 = " + valueSet($("#Price3").val()) + ",Amount3 = " + valueSet($("#Amount3").val()) + ",TaxRate3 = " + valueSet($("#TaxRate3").val()) + ",Tax3 = " + valueSet($("#Tax3").val()) + ",";
                            sql += "FeeType4 =  '" + $("#FeeType4").val() + "',Model4 = '" + $("#Model4").val() + "',Unit4 = '" + $("#Unit4").val() + "',QTY4 = " + valueSet($("#QTY4").val()) + ",Price4 = " + valueSet($("#Price4").val()) + ",Amount4 = " + valueSet($("#Amount4").val()) + ",TaxRate4 = " + valueSet($("#TaxRate4").val()) + ",Tax4 = " + valueSet($("#Tax4").val()) + ",";
                            sql += "FeeType5 =  '" + $("#FeeType5").val() + "',Model5 = '" + $("#Model5").val() + "',Unit5 = '" + $("#Unit5").val() + "',QTY5 = " + valueSet($("#QTY5").val()) + ",Price5 = " + valueSet($("#Price5").val()) + ",Amount5 = " + valueSet($("#Amount5").val()) + ",TaxRate5 = " + valueSet($("#TaxRate5").val()) + ",Tax5 = " + valueSet($("#Tax5").val()) + ",";
                            sql += "FeeType6 =  '" + $("#FeeType6").val() + "',Model6 = '" + $("#Model6").val() + "',Unit6 = '" + $("#Unit6").val() + "',QTY6 = " + valueSet($("#QTY6").val()) + ",Price6 = " + valueSet($("#Price6").val()) + ",Amount6 = " + valueSet($("#Amount6").val()) + ",TaxRate6 = " + valueSet($("#TaxRate6").val()) + ",Tax6 = " + valueSet($("#Tax6").val()) + ",";
                            sql += "FeeType7 =  '" + $("#FeeType7").val() + "',Model7 = '" + $("#Model7").val() + "',Unit7 = '" + $("#Unit7").val() + "',QTY7 = " + valueSet($("#QTY7").val()) + ",Price7 = " + valueSet($("#Price7").val()) + ",Amount7 = " + valueSet($("#Amount7").val()) + ",TaxRate7 = " + valueSet($("#TaxRate7").val()) + ",Tax7 = " + valueSet($("#Tax7").val()) + ",";
                            sql += "FeeType8 =  '" + $("#FeeType8").val() + "',Model8 = '" + $("#Model8").val() + "',Unit8 = '" + $("#Unit8").val() + "',QTY8 = " + valueSet($("#QTY8").val()) + ",Price8 = " + valueSet($("#Price8").val()) + ",Amount8 = " + valueSet($("#Amount8").val()) + ",TaxRate8 = " + valueSet($("#TaxRate8").val()) + ",Tax8 = " + valueSet($("#Tax8").val()) + ",";
                            sql += "InvoiceTOTitle = '" + $("#InvoiceTOTitle").val() + "',InvoiceTOTaxNo = '" + $("#InvoiceTOTaxNo").val() + "',InvoiceTOAddr = '" + $("#InvoiceTOAddr").val() + "',InvoiceTOAccount = '" + $("#InvoiceTOAccount").val() + "',Note = '" + $("#Note").val() + "',"
                            sql += "UserGet = '" + $("#UserGet").val() + "',UserDoc = '" + $("#UserDoc").val() + "',UserVerify = '" + $("#UserVerify").val() + "',UserModifyID = "+ currentUID +",ModifyDate = getdate()"
                            sql += " WHERE UID = " + $("#UID").val() + "";
                            $.ajax({
                                cache: false, async: false,
                                url: '../handler/ajax.ashx?type=AjaxSystem&method=DoSql',
                                dataType: 'json', type: 'post',
                                data: { SQL: sql },
                                beforeSend: function () {
                                    $.omMessageBox.waiting({
                                        title: '请等待',
                                        content: '系统正在保存,请稍后...'
                                    });
                                },
                                complete: function () {
                                    $.omMessageBox.waiting("close");
                                },
                                success: function (data) {
                                    if (data.IsError) {
                                        $.omMessageBox.alert({
                                            content: '错误：' + data.Message
                                        });
                                    }
                                    else {
                                        $.omMessageBox.alert({
                                            content: "保存成功",
                                            onClose: function () {
                                                art.dialog.close();
                                            }
                                        });
                                    }
                                },
                                error: function (result) {
                                    $.omMessageBox.alert({
                                        content: '发现系统错误,请重新登录<BR>错误码：' + result.status
                                    });
                                }
                            });
                        }
                    }
                }
            });
            $('span#button-reset', form).omButton({
                icons: { left: '../Content/Images/List/reset.gif' }, width: 80,
                onClick: function () {
                    var oldamount = $("#bodyform input[id=InvoiceAmount]").val();
                    $("#bodyform input").val('');
                    $("#bodyform input[id=InvoiceAmount]").val(oldamount);
                    $("#FeeType1").val("报关费");
                    $("#Unit1").val("票");
                    $("#QTY1").val(1);
                    $("#Price1").val((oldamount / 1.06).toFixed(2));
                    $("#Amount1").val((oldamount / 1.06).toFixed(2));
                    $("#TaxRate1").val(0.06);
                    $("#Tax1").val((oldamount * 0.06 / 1.06).toFixed(2));
                    calTotal('Amount');
                    calTotal('Tax');
                }
            });
            $('span#button-confirm', form).omButton({
                icons: { left: '../Content/Images/List/ok.gif' }, width: 80,
                onClick: function () {
                    $.ajax({
                        cache: false, async: false,
                        url: '../handler/ajax.ashx?type=AjaxSystem&method=InvoiceBill',
                        dataType: 'json', type: 'post',
                        data: { UID: $("UID").val(), TYPEID: 0, USERID: currentUID },
                        beforeSend: function () {
                            $.omMessageBox.waiting({
                                title: '请等待',
                                content: '系统正在提交信息,请稍后...'
                            });
                        },
                        complete: function () {
                            $.omMessageBox.waiting("close");
                        },
                        success: function (data) {
                            if (data.IsError) {
                                $.omMessageBox.alert({
                                    content: '错误：' + data.Message
                                });
                            }
                            else {
                                $.omMessageBox.alert({
                                    content: '确认成功',
                                    onClose: function () {
                                        art.dialog.close();
                                    }
                                });
                            }
                        },
                        error: function (result) {
                            $.omMessageBox.alert({
                                content: '发现系统错误,请重新登录<BR>错误码：' + result.status
                            });
                        }
                    });
                }
            });
            $('span#button-cancel', form).omButton({
                icons: { left: '../Content/Images/List/cross.png' }, width: 80,
                onClick: function () {
                    $.ajax({
                        cache: false, async: false,
                        url: '../handler/ajax.ashx?type=AjaxSystem&method=InvoiceBill',
                        dataType: 'json', type: 'post',
                        data: { UID: $("UID").val(), TYPEID: 1, USERID: currentUID },
                        beforeSend: function () {
                            $.omMessageBox.waiting({
                                title: '请等待',
                                content: '系统正在提交信息,请稍后...'
                            });
                        },
                        complete: function () {
                            $.omMessageBox.waiting("close");
                        },
                        success: function (data) {
                            if (data.IsError) {
                                $.omMessageBox.alert({
                                    content: '错误：' + data.Message
                                });
                            }
                            else {
                                $.omMessageBox.alert({
                                    content: '撤销成功',
                                    onClose: function () {
                                        art.dialog.close();
                                    }
                                });
                            }
                        },
                        error: function (result) {
                            $.omMessageBox.alert({
                                content: '发现系统错误,请重新登录<BR>错误码：' + result.status
                            });
                        }
                    });
                }
            });
        }

        showDetialForm = function (rowData, showform) {
            if (detailPanel) {
                detailPanel.omPanel("open");
            }
            else {
                detailPanel = $('#detail-form').omPanel({
                    width: 'fit',
                    title: "<span style='color:#15428B;font-weight: bold;padding:6px;'>发票信息</span>",
                    collapsed: false,
                    collapsible: false,
                    closable: false
                });
            }
            rowData = rowData || {};
            $.each(rowData, function (n, value) {   
                if (n == 'Note') {
                    $("#"+n, showform).html(value);
                }
                else {
                    $("input[id='" + n + "']", showform).val(value);
                }
            })
        };

        function valueSet(mm) {
            if (mm == '') {
                return 0;
            }
            else {
                return mm;
            }
        }

    </script>
</head>
<body>
    <div id="detail-form">
        <form id="detail">
            <div id="errorMessages" class="error"></div>
            <table id="headform" style="width:100%;">
                <tr style="display:none;">
                    <td colspan="4">
                        <input name="UID" id="UID" value="0" tabindex="-1" />
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 80px;">名称</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" title="名称" name="InvoiceFMTitle" id="InvoiceFMTitle" style="width: 90%;" tabindex="-1" /></td>
                    <td align="right" style="width: 100px;">纳税人识别号</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" title="纳税人识别号" name="InvoiceFMTaxNo" id="InvoiceFMTaxNo" style="width: 90%;" tabindex="-1" /></td>
                </tr>
                <tr>
                    <td align="right" style="width: 80px;">地址电话</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" title="地址电话" name="InvoiceFMAddr" id="InvoiceFMAddr" style="width: 90%;" tabindex="-1" />
                    </td>
                    <td align="right" style="width: 100px;">开户行及账号</td>
                    <td align="left" style="width: 250px" colspan="3">
                        <input type="text" class="input-text" title="开户行及账号" name="InvoiceFMAccount" id="InvoiceFMAccount" style="width: 90%;" tabindex="-1" /></td>
                </tr>
            </table>
            <table id="bodyform" style="width:100%;">
                <tr>
                    <td>条应税劳务名称</td>
                    <td>规格型号</td>
                    <td>单位</td>
                    <td>数量</td>
                    <td>单价</td>
                    <td>金额</td>
                    <td>税率</td>
                    <td>税额</td>
                </tr>
                <tr>
                    <td><input type="text" name="FeeType1" id="FeeType1" tabindex="1" style="width:100px;"/></td>
                     <td><input type="text" name="Model1" id="Model1" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Unit1" id="Unit1" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="QTY1" id="QTY1" tabindex="1"  style="width:80px;" /></td>
                     <td><input type="text" name="Price1" id="Price1" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Amount1" id="Amount1" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td><input type="text" name="TaxRate1" id="TaxRate1" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Tax1" id="Tax1" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
                <tr>
                    <td><input type="text" name="FeeType2" id="FeeType2" tabindex="1" style="width:100px;"/></td>
                     <td><input type="text" name="Model2" id="Model2" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Unit2" id="Unit2" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="QTY2" id="QTY2" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Price2" id="Price2" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Amount2" id="Amount2" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td><input type="text" name="TaxRate2" id="TaxRate2" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Tax2" id="Tax2" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
                <tr>
                    <td><input type="text" name="FeeType3" id="FeeType3" tabindex="1" style="width:100px;" /></td>
                     <td><input type="text" name="Model3" id="Model3" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Unit3" id="Unit3" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="QTY3" id="QTY3" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Price3" id="Price3" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Amount3" id="Amount3" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td><input type="text" name="TaxRate3" id="TaxRate3" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Tax3" id="Tax3" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
                <tr>
                    <td><input type="text" name="FeeType4" id="FeeType4" tabindex="1" style="width:100px;" /></td>
                     <td><input type="text" name="Model4" id="Model4" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Unit4" id="Unit4" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="QTY4" id="QTY4" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Price4" id="Price4" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Amount4" id="Amount4" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td><input type="text" name="TaxRate4" id="TaxRate4" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Tax4" id="Tax4" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
                <tr>
                    <td><input type="text" name="FeeType5" id="FeeType5" tabindex="1" style="width:100px;" /></td>
                     <td><input type="text" name="Model5" id="Model5" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Unit5" id="Unit5" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="QTY5" id="QTY5" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Price5" id="Price5" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Amount5" id="Amount5" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td><input type="text" name="TaxRate5" id="TaxRate5" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Tax5" id="Tax5" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
                <tr>
                    <td><input type="text" name="FeeType6" id="FeeType6" tabindex="1" style="width:100px;" /></td>
                     <td><input type="text" name="Model6" id="Model6" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Unit6" id="Unit6" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="QTY6" id="QTY6" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Price6" id="Price6" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Amount6" id="Amount6" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td><input type="text" name="TaxRate6" id="TaxRate6" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Tax6" id="Tax6" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
                <tr>
                    <td><input type="text" name="FeeType7" id="FeeType7" tabindex="1" style="width:100px;" /></td>
                     <td><input type="text" name="Model7" id="Model7" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Unit7" id="Unit7" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="QTY7" id="QTY7" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Price7" id="Price7" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Amount7" id="Amount7" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td><input type="text" name="TaxRate7" id="TaxRate7" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Tax7" id="Tax7" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
                <tr>
                    <td><input type="text" name="FeeType8" id="FeeType8" tabindex="1" style="width:100px;" /></td>
                     <td><input type="text" name="Model8" id="Model8" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Unit8" id="Unit8" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="QTY8" id="QTY8" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Price8" id="Price8" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Amount8" id="Amount8" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td><input type="text" name="TaxRate8" id="TaxRate8" tabindex="1" style="width:80px;" /></td>
                     <td><input type="text" name="Tax8" id="Tax8" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
                <tr>
                    <td><input type="text" name="InvoiceAmount" id="InvoiceAmount" tabindex="1" style="width:100px;" disabled="disabled" /></td>
                     <td></td>
                     <td></td>
                     <td></td>
                     <td></td>
                    <td><input type="text" name="Amount" id="Amount" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                     <td></td>
                     <td><input type="text" name="Tax" id="Tax" tabindex="1" style="width:80px;" disabled="disabled" /></td>
                </tr>
            </table>
            <table id="footform" style="width:100%;">
                <tr>
                    <td align="right" style="width: 80px;">名称</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" name="InvoiceTOTitle" id="InvoiceTOTitle" style="width: 90%;" tabindex="-1" /></td>
                    <td align="right" style="width: 120px;">纳税人识别号</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" name="InvoiceTOTaxNo" id="InvoiceTOTaxNo" style="width: 90%;" tabindex="-1" /></td>
                    <td align="left" colspan="2" rowspan="2">
                        <textarea id="Note" rows="3" cols="1" style="width:100%;"></textarea>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 80px;">地址电话</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" name="InvoiceTOAddr" id="InvoiceTOAddr" value="" style="width: 90%;" tabindex="-1" />
                    </td>
                    <td align="right" style="width: 100px;">开户行及账号</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" name="InvoiceTOAccount" id="InvoiceTOAccount" style="width: 90%;" tabindex="-1" /></td>
                </tr>
                <tr>
                    <td align="right" style="width: 80px;">收款人</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" name="UserGet" id="UserGet" value="" style="width: 90%;" tabindex="-1" />
                    </td>
                    <td align="right" style="width: 100px;">复核人</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" name="UserVerify" id="UserVerify" style="width: 50%;" tabindex="-1" /></td>
                    <td align="right" style="width: 100px;">开票人</td>
                    <td align="left" style="width: 250px">
                        <input type="text" class="input-text" name="UserDoc" id="UserDoc" value="" style="width: 90%;" tabindex="-1" />
                    </td>
                </tr>
                 <tr>
                    <td colspan="6" align="center">
                        <span id="button-clear">清空明细</span>
                        <span id="button-cal">重新计算</span>
                        <span id="button-confirm">确    认</span>
                        <span id="button-cancel">取　消</span>
                        <span id="button-reset">反    算</span>
                        <span id="button-save">保存</span>
                        <span id="button-close">关闭</span>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>
